package com.rulin.asp.business.datacleaning;

import java.util.List;

import org.apache.commons.lang3.tuple.Pair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rulin.asp.business.entity.Page;

@Service
public class DataListService {

	@Autowired
	private DataListMapper dataListMapper;
	
	public Pair<Integer, List<QueryResultRowBean>> getListByParam(QueryParamBean param){
		Page page = param.getPage();
		int total = dataListMapper.countByParam(param);
		page.setTotal(total);
		List<QueryResultRowBean> list = dataListMapper.selectByParam(param);
		return Pair.of(total, list);
	}
}
